package com.normal.zbase.impl.base

import com.google.gson.Gson
import com.normal.zbase.impl.exceptions.CODE_SUCCESS
import com.normal.zbase.impl.exceptions.CODE_TOKEN_INVALID
import com.normal.zbase.impl.exceptions.CloudException
import com.normal.zbase.impl.tools.utils.JsonUtils.fromJson

/**
 * 公用
 */
open class ABaseResponse<T>(
     var code: String? = null,
     var data: T? = null,
) {

    inline fun <reified T> FAIL(json: String){

    }
    fun isSuccess(): Boolean {
        return code == CODE_SUCCESS
    }


    fun isTokenInValid(): Boolean {
        return code == CODE_TOKEN_INVALID
    }

}